<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>货柜堆存量信息查询</title>
    <s:head/>
</head>
<script type="text/javascript">
    var formSetting = {
        title: "货柜堆存量信息查询",
        module: 'query',
        columns: [{
            name: "owner.id",
            label: "供应商",
            type: "dropdown",
            dropdownType: "ajax",
            url: "../base/dropdown-supCop",
            minLength: 0,
            validate: 'validate[required]'
        }, {
            name: "shipCompany.id",
            label: "大船公司",
            type: "dropdown",
            dropdownType: "ajax",
            url: "../base/dropdown-shipCom",
            minLength: 1,
            validate: 'validate[required]'
        }/* , {
         name : "identifier",
         label : "标识符"
         }, {
         name : "use_state",
         label : "使用状态",
         type : "dropdown",
         data : [ [ "启用", "0" ], [ "未启用", "1" ] ]
         } */],
        buttons: {},
        grid: {
            id: "ctQueryInfosDataGrid",
            title: "查询结果",
            url: "bizInfoQuery-findCtInfo",
            /* postData : {
             "pid" : pid
             }, */
            colModel: [{
                index: "ID",
                name: "ID",
                hidden: true
            }, {
                index: "SHIP_COM",
                name: "shipCompany.name",
                label: "大船公司"
            }, {
                index: "dataSrc",
                name: "owner.name",
                label: "数据来源"
            }, {
                index: "result",
                name: "result",
                label: "查询结果"
            }, {
                index: "qTime",
                name: "qTime",
                label: "查询时间",
                formatter: 'date',
                formatoptions: {srcformat: 'Y-m-d H:i:s', newformat: 'Y-m-d H:i:s'}
            }],
            jsonReader: {
                userdata: "msg",
                root: "ctQueryInfos"
            },
            gridComplete: function () {
                var msg = $("#ctQueryInfosDataGrid").jqGrid('getGridParam', 'userData');
                if (typeof msg == "string") {
                    jw.alert(msg);
                }
            }
        }
    };
    $(document).ready(function () {
        $("#ctQueryInfosDataTable").mrdForm(formSetting);
    });
</script>
<body>
<div id="ctQueryInfosDataTable"></div>
</body>
</html>
